﻿using System;
using GN.Pay.TradeChannel.DefaultImpl;

namespace GN.Pay.TradeChannel.WeiXin.Response
{
    /// <summary>
    /// h5支付 响应结果
    /// </summary>
    [Serializable]
    class H5PayResponse : PayResponse
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="xml"></param>
        public H5PayResponse(string xml)
            : base(xml)
        {
        }

        /// <summary>
        /// 支付跳转链接	
        /// </summary>
        public string mweb_url { get; set; }

        /// <summary>
        /// 转为结果
        /// </summary>
        /// <param name="config"></param>
        /// <returns></returns>
        public override ITradePayApplyResult ToResult(WeiXinConfigure config)
        {
            ToResultCheck(config);
            return new TradePayApplyResult(Prepay_Id, this.mweb_url, "", TradePayApplyResultCallType.Web_Get);
        }
    }
}
